<template>
	<div class="box">
		<div class="title">{{data.title}}</div>
		<div class="time">{{data.ctime}}</div>
		<div class="content">
			<rich-text :nodes="data.content"></rich-text>
		</div>
	</div>

</template>

<script>
	let _this;
	import sunuiTemplate from '@/components/sunui-template/sunui-template.vue'
	import utils from '@/common/util.js'
	import indexApi from '@/api/index.js'

	export default {
		components: {
			sunuiTemplate
		},
		data() {
			return {
				data: {}
			};
		},
		onLoad(query) {
			_this = this;
			console.log(query)
			_this.initData(query)
			// _this.data = JSON.parse(query.dataJson)
			// _this.data.ctime = utils.getDate(Number(_this.data.ctime))
		},
		methods: {
			initData(query) {
				console.log(query)
				indexApi.ggInfo(query).then(res => {
					console.log(res)
					_this.data = res.data

				})
			}
		}
	}
</script>

<style scoped>
	.box {
		padding: 20upx 30upx;
	}

	.title {
		font-size: 35upx;
		line-height: 1.4;
		margin-bottom: 25upx;
		margin-top: 10upx;
		text-align: center;
		font-family:"Microsoft YaHei UI";
	}

	.time {
		text-align: center;
		font-size: 30upx;
		color: rgba(0,0,0,0.3);
		vertical-align: middle;
		margin: 0 20ipx 20upx 0;
		font-size: 15px;
	}

	.content {
		padding-top: 20upx;
	}
</style>
